import QtQuick
import QtQuick3D
import QtQuick3D.Physics

import "./ground"

Node{
    Node {
        id: scene
        DirectionalLight {
            id: directionalLight
            x: 395.54
            y: 569.391
            z: 22.51694
            eulerRotation.z: -90.2627
            eulerRotation.y: 86.72846
            eulerRotation.x: -53.50251
        }

        PerspectiveCamera {
            id: sceneCamera
            x: 0
            y: 693.273
            eulerRotation.z: 0.00012
            eulerRotation.y: -0.00011
            eulerRotation.x: -83.69267
            z: 69.78546
        }

        Repeater3D{
            x: -400
            y: -50
            z: -300

            property int width:9
            property int height:7

            model: {
                var ret = []

                for(var i = 0;i<width;i++)
                {
                    for(var j = 0;j<height;j++)
                    {
                        ret.push({i:i,j:j})
                    }
                }

                return ret
            }

            Block{
                x:modelData.i * 100
                z:modelData.j * 100
                state: Block.OK

            }

        }

        Ground{

        }

    }

    Node {
        id: __materialLibrary__

        DefaultMaterial {
            id: defaultMaterial
            objectName: "Default Material"
            diffuseColor: "grey"
        }
    }

}
